/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.modules.fin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.dian.common.validator.group.AddGroup;
import com.dian.common.validator.group.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
    import com.dian.common.entity.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
/**
 * 收款明细单
 *
 * @author 赵淼
 * @email 1752060891@qq.com
 * @date 2019-06-15 16:33:49
 */
@Data
@TableName("fin_recei_detail")
public class ReceiDetailEntity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 组织ID
     *//*
        @NotNull(message="组织ID不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Long tenantId;*/
        /**
        * 单据编码
        */
        @NotBlank(message="单据编码不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="单据编码长度不能超过20个字符")
        private String receiNo;
        /**
        * 单据日期;format:yyyy-mm-dd
        */
        @JsonFormat(pattern = "yyyy-MM-dd")
        @NotNull(message="单据日期不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Date receiDate;
        /**
        * 门店id;来源于base_store.id
        */
        @NotNull(message="门店id不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Long storeId;
        /**
        * 门店id;来源于base_store.customer_name
        */
        @NotBlank(message="门店名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=60,  groups ={AddGroup.class, UpdateGroup.class}, message="门店名称长度不能超过60个字符")
        private String storeName;
        /**
        * 预订单ID;来源于sale_prob_head.Id
        */
        @NotNull(message="预订单id不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Long probId;
        /**
        * 订单编码;来源于Sale_Order_Head.Order_No
        */
        @NotBlank(message="预订单编码不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="预订单编码长度不能超过20个字符")
        private String probNo;
        /**
        * 客户ID;来源于base_customer.id
        */
        @NotNull(message="客户ID不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Long customerId;
        /**
        * 客户编码;来源于base_customer.customer_code
        */
        @NotBlank(message="客户编码不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=20,  groups ={AddGroup.class, UpdateGroup.class}, message="客户编码长度不能超过20个字符")
        private String customerCode;
        /**
        * 客户名称;来源于base_customer.customer_name
        */
        @NotBlank(message="客户名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="客户名称长度不能超过40个字符")
        private String customerName;
        /**
        * 客户联系人;来源于base_customer.customer_contact_name
        */
        @NotBlank(message="客户联系人不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="客户联系人长度不能超过40个字符")
        private String customerContactName;
        /**
        * 客户电话;来源于base_customer.customer_tel
        */
        @NotBlank(message="客户电话不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="客户电话长度不能超过40个字符")
        private String customerContactTel;
        /**
        * 送货地址;来源于base_customer.customer_add
        */
        @NotBlank(message="送货地址不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="送货地址长度不能超过40个字符")
        private String customerContactAdd;
        /**
        * 订单状态:1-未审核-WAITCHECK;2-已审核-AUDITED-;99-已作废-INVALID
        */
        @NotNull(message="订单状态不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private Integer receiState;
        /**
        * 审核人ID
        */
        private Long checkUserId;
        /**
        * 审核人
        */
        private String checkUserName;
        /**
        * 审核时间
        */
        private Date checkDate;
        /**
        * 收款类型;来源于base_store.customer_name
        */
        @NotBlank(message="收款类型不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=60,  groups ={AddGroup.class, UpdateGroup.class}, message="收款类型长度不能超过60个字符")
        private String payTypeName;

        /**
        * 收款名称;来源于base_store.customer_name
        */
        @NotBlank(message="收款名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=60,  groups ={AddGroup.class, UpdateGroup.class}, message="收款名称长度不能超过60个字符")
        private String payMentName;
        /**
        * 收款银行名称;来源于base_store.customer_name
        */
        @NotBlank(message="收款银行名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
        @Length(max=60,  groups ={AddGroup.class, UpdateGroup.class}, message="收款银行名称长度不能超过60个字符")
        private String bankAccountName;

        /**
         * 收款金额
         */
        @NotNull(message=" 收款金额不能为空",groups = {AddGroup.class,UpdateGroup.class})
        private BigDecimal receiAmount;


}
